#include <stdio.h>
#include <unistd.h>
int main()
{
  int id=fork();
  while(1)
  {
   if(id==0)
    {
      printf("I am child\n");
      sleep(1);
    }
    else if(id>0)
    {
      printf("I am father\n");
      sleep(1);
    }
    else 
    {
      printf("fail\n");
      sleep(1);
    }

  }

}
